
//左下柱状图折线图
function barLineEvt(dataX,data1,data2,ele){
    var barOption = {
        color:["#c8fd6f","#08e2ca"],
        tooltip: {
            trigger: 'axis'
    //      axisPointer: {
    //          type: 'cross',
    //          crossStyle: {
    //              color: '#999'
    //          }
    //      }
        },
        legend: {
            show:true,
            top:'top',
            textStyle:{
                color:'#fff'
            },
          data:['活跃度','终端数量']
        },
        grid: {
          top:'20%',
	        left: '6%',
	        right: '3%',
	        bottom: '3%',
	        containLabel: true
        },
        xAxis: [
            {
              type: 'category',
              data: dataX,
              axisPointer: {
                  type: 'shadow'
              },
              axisLabel:{
				  show: true,
                  color:'#c0d4da',
				  interval:false,
				  rotate : 20,
              },
              axisLine:{
                    show:true,
                    lineStyle:{
                        color:'#c0d4da'
                    }
                }
            }
        ],
        yAxis: [
            {
                type: 'value',
                name: '单位:亿',
                min: 0,
                max: 40,
                interval: 10,
                axisLabel: {
                    color:'#c0d4da'
                  },
                  axisLine:{
                        show:true,
                        lineStyle:{
                            color:'#c8fd6f'
                        }
                    },
                    splitLine:{
                        lineStyle:{
                            color:'#272858'
                        }
                    }
            },
            {
                type: 'value',
                name: '单位:万',
                min: 0,
                max: 8,
                interval: 2,
                axisLabel: {
                  color:'#c0d4da'
                },
                axisLine:{
                      show:true,
                      lineStyle:{
                          color:'#08e2ca'
                      }
                  },
                  splitLine:{
                      lineStyle:{
                          color:'#272858'
                      }
                  }
              }
        ],
        series: [
          {
            name:'活跃度',
            type:'bar',
            barWidth:'35%',
            data:data1,
          },
          {
            name:'终端数量',
            type:'line',
            smooth:true,
            symbol: 'circle',
            data:data2,
            yAxisIndex: 1,
       }
        ]
    };
    var barChart = echarts.init(document.getElementById(ele))
    barChart.setOption(barOption);
    window.addEventListener("resize", function () {
        barChart.resize();
    });
}
var dataX=['COSMOPLat','航天云网INDICS','浪潮m81','徐工工业云','根云平台']
var data2=[7.2656,0.4714,0.0079,2.3782,0.0473]   
var data1=[33.75325679,0.29321862,0.05240724,0.00531361,0.00025417]
barLineEvt(dataX,data1,data2,"numBarLineEc")


//地图

var geoCoordMap={}
var mapFeatures = echarts.getMap('china').geoJson.features;
mapFeatures.forEach(function(v) {
    // 地区名称
    var name = v.properties.name;
    // 地区经纬度
    geoCoordMap[name] = v.properties.cp;
});

function convertData(data) {
   var res = [];
   for (var i = 0; i < data.length; i++) {
       var geoCoord = geoCoordMap[data[i].name];
       if (geoCoord) {
           res.push({
               name: data[i].name,
               value: geoCoord.concat(data[i].value)
           });
       }
   }
   return res;
};

var mapData=[
    {name: '北京',value: 49 },
    {name: '天津',value: 9},
    {name: '上海',value: 20 },
    {name: '重庆',value: 38 },
    {name: '河北',value: 1},
    {name: '河南',value:0 },
    {name: '云南',value: 4 },
    {name: '辽宁',value: 0 },
    {name: '黑龙江',value: 0 },
    {name: '湖南',value: 14 },
    {name: '安徽',value: 2 },
    {name: '山东',value: 169 },
    {name: '新疆',value: 0},
    {name: '江苏',value: 25 },
    {name: '浙江',value: 3 },
    {name: '江西',value: 0 },
    {name: '湖北',value: 7 },
    {name: '广西',value: 0 },
    {name: '甘肃',value: 2 },
    {name: '山西',value: 1 },
    {name: '内蒙古',value: 4 },
    {name: '陕西',value: 0 },
    {name: '吉林',value: 0 },
    {name: '福建',value: 29 },
    {name: '贵州',value: 0 },
    {name: '广东',value: 53 },
    {name: '青海',value: 0 },
    {name: '西藏',value: 0 },
    {name: '四川',value: 1 },
    {name: '宁夏',value: 0 },
    {name: '海南',value: 0 },
    {name: '台湾',value: 0 },
    {name: '香港',value: 1 },
    {name: '澳门',value: 0 }
]

for(var i=0;i<mapData.length;i++){
	for(key in geoCoordMap){
		if(key==mapData[i].name){
			mapData[i].value=geoCoordMap[key].concat(mapData[i].value)
		}
	}
}
console.log(geoCoordMap)
console.log(mapData,'--')


var optionMap = {
    tooltip: {
        trigger: 'item',
        formatter:function(param){
            return '<div>'+param.name+'</div>'+
                   '<div>平台IP数：'+param.data.value[2]+'</div>';
        }
    },
    /*visualMap: {
        seriesIndex: 0,
        min: 0,
        max: 80,
        itemHeight:'70',
        left: '10%',
        bottom: '10%',
        inRange: {
        //    color: ['#0ef0e6','#076ba6']
    color: ['#3AE9F2','#FFBA3F'] 
        },
        calculable: true,
        textStyle:{
            color:'#fff'
        }
    },*/
    geo: {
			show: true,
			zoom: 1.2,
			roam: false,
			map: 'china',
			itemStyle: {
				normal: {
					show: false,
					borderColor: '#285ac6',
					borderWidth: 1,
					areaColor: '#123082',
					shadowBlur: 3,
					shadowColor: '#081435',
					shadowOffsetX: -4,
					shadowOffsetY: 8
				},
				emphasis: {
					areaColor: '#fce24f',
					borderColor: '#fce24f'
				}
			}
		},
    series: [{
			type: 'map',
			zoom: 1.2,
			mapType: 'china',
			roam: false,
			label: {
				normal: {
					show: false,
					textStyle: {
						color: '#fff'
					}
				},
				emphasis: {
					show: true,
					textStyle: {
						color: '#fff'
					}
				}
			},
			itemStyle: {
				normal: {
					show: false,
					borderColor: '#3770ea',
					borderWidth: 1,
					areaColor: '#0f2d87'
				},
				emphasis: {
					areaColor: '#2a56bd',
					borderColor: '#2a56bd'
				}
			},
			data: mapData
		},{
			name: 'Top 5',
			type: 'effectScatter',
			zlevel: 1,
			coordinateSystem: 'geo',
			symbolSize: function(val) {
				return val[2] / 80 * 10+15
			},
			showEffectOn: 'render',
			rippleEffect: {
				brushType: 'stroke'
			},
			hoverAnimation: true,
			label: {
				normal: {
					//            formatter: '{b}',
					position: 'right',
					show: false
				}
			},
			itemStyle: {
				normal: {
					color: '#f4e925',
					shadowBlur: 10,
					shadowColor: '#333'
				}
			},
			//    data: convertData(mapData)
			data: mapData.sort(function(a,b){
				return b.value[2]-a.value[2]
			}).slice(0,5)
		},{
			name: 'Top 5',
			type: 'scatter',
			zlevel: 1,
			coordinateSystem: 'geo',
			symbolSize: function(val) {
				//        return val*4+8;
				return val[2] / 53 * 20 
			},
			showEffectOn: 'render',
			rippleEffect: {
				brushType: 'stroke'
			},
			hoverAnimation: true,
			label: {
				normal: {
					//            formatter: '{b}',
					position: 'right',
					show: false
				}
			},
			itemStyle: {
				normal: {
					color: '#f4e925',
					shadowBlur: 10,
					shadowColor: '#333'
				}
			},
			//    data: convertData(mapData)
			data: mapData.sort(function(a,b){
				return b.value[2]-a.value[2]
			}).slice(5)
		}]
};
var mapChart = echarts.init(document.getElementById('webChina'))
mapChart.setOption(optionMap)
window.addEventListener("resize", function () {
    mapChart.resize()
});

//根据平台来轮循
var ptData=[
    ["根云","9","6","473","25417",'["天津"]'],
    ["航天云网INDICS","8","3","4714","29321862",'["北京","内蒙古","福建","湖北","四川"]'],
    ["海尔COSMOPlat","354","80","72656","3375325679",'["上海","浙江","山东","广东","北京","重庆","福建","湖南","江苏","湖北","云南","甘肃","安徽","河北","内蒙古","山西"]'],
    ["中国移动OneNET","5","3","4654","4774",'["重庆"]'],
    ["中国电信CPS开放平台","2","2","152","1534337",'["北京"]'],
    ["阿里云ET大脑","17","17","624866","424785",'["四川"]'],
    ["浪潮m81","7","2","79","5240724",'["山东","湖北"]'],
    ["用友-精智","7","2","237","3751055097",'["山东","湖北","安徽","北京"]'],
    ["宝信工业互联网平台","5","3","0","65662389",'["上海"]'],
    ["机智云","3","1","13","13963851",'["广东","上海"]'],
    ["普奥云proudthink","3","1","18","84307",'["山东","北京"]'],
    ["智能云科isesol","2","1","68","9977",'["北京"]'],
    ["和利时hiacloud","2","2","57","2168306",'["浙江","香港"]'],
    ["华为oceanconnect","2","1","0","50462",'["北京","江苏"]'],
    ["寄云科技neuseer","2","2","2389","218",'["北京"]'],
    ["美云智数meicloud","1","1","111","274",'["广东"]'],
    ["阿里云ET大脑","1","1","53","43901788",'["上海"]'],
    ["东方国信BIOP平台","1","1","288","282",'["北京"]'],
    ["富士康beacon","1","1","629","3615",'["广东"]'],
    ["石化盈科promace","1","1","0","53",'["北京"]'],
    ["索为-SYSWARE","1","1","5","1886",'["北京"]'],
    ["中船工业-船舶工业智能运营平台","1","1","10","0",'["浙江"]'],
    ["徐工工业云","14","1","23782","531361",'["江苏"]']
]
/******************************v定时器*********************************/
var iNum=0
var timer
function  equipShow() {
    $("#ranklistRight3 .tab_content").html("")
    $("#ranklistRight3 .tab_content").append("<tr>"+
    "<td style='width:150px;'>"+ptData[iNum][0]+"</td>"+
    "<td>"+ptData[iNum][1]+"</td>"+
    "<td>"+ptData[iNum][2]+"</td>"+
    "<td>"+ptData[iNum][3]+"</td>"+
    "<td>"+ptData[iNum][4]+"</td>"+
+"</tr>")
    //省高亮
    for(var i=0;i<mapData.length;i++){
        mapData[i].selected=false;
    }
    var cityArr=JSON.parse(ptData[iNum][5])
    for(var m=0;m<cityArr.length;m++){
        for(var j=0;j<mapData.length;j++){
            if(cityArr[m]==mapData[j].name){
                mapData[j].selected=true;
            }
        }
    }
    mapChart.setOption(optionMap);

    iNum++;
    if(iNum>ptData.length-1){
		iNum=0;
	}
}
equipShow()
timer=window.setInterval(equipShow,2000)

mapChart.on('mouseover',function(params){
	clearInterval(timer);
})
mapChart.on('mouseout',function(){
	clearInterval(timer)
	timer=setInterval(equipShow,2000)
})

mapChart.on('mouseout',function(){
	clearInterval(timer)
	timer=setInterval(equipShow,2000)
})

mapChart.on('click',function(param){
	mapClick(param.name);
})

function mapClick(name){
	var datas = null;
	if(name == '天津'){
		datas = [
			["根云","9","6","473","25417"]
		];
	}else if(name == '北京'){
		datas = [
			["中国电信CPS开放平台","2","2","152","1534337"],
			["航天云网INDICS","8","3","4714","29321862"],
			["用友-精智","7","2","237","3751055097"],
			["海尔COSMOPlat","354","80","72656","3375325679"],
			["普奥云proudthink","3","1","18","84307"],
			["智能云科isesol","2","1","68","9977"],
			["华为oceanconnect","2","1","0","50462"],
			["寄云科技neuseer","2","2","2389","218"],
			["东方国信BIOP平台","1","1","288","282"],
			["石化盈科promace","1","1","0","53"],
			["索为-SYSWARE","1","1","5","1886"]
		];
	}else if(name == '内蒙古'){
		datas = [
			["航天云网INDICS","8","3","4714","29321862"],
			["海尔COSMOPlat","354","80","72656","3375325679"]
		];
	}else if(name == '福建'){
		datas = [
			["航天云网INDICS","8","3","4714","29321862"],
			["海尔COSMOPlat","354","80","72656","3375325679"]
		];
	}else if(name == '湖北'){
		datas = [
			["航天云网INDICS","8","3","4714","29321862"],  
			["浪潮m81","7","2","79","5240724"],
			["用友-精智","7","2","237","3751055097"],
			["海尔COSMOPlat","354","80","72656","3375325679"]
		];
	}else if(name == '四川'){
		datas = [
			["航天云网INDICS","8","3","4714","29321862"],
			["阿里云ET大脑","17","17","624866","424785"]
		];
	}else if(name == '上海'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"],
			["宝信工业互联网平台","5","3","0","65662389"],
			["机智云","3","1","13","13963851"],
			["阿里云ET大脑","1","1","53","43901788"]
		];
	}else if(name == '浙江'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"],
			["和利时hiacloud","2","2","57","2168306"],
			["中船工业-船舶工业智能运营平台","1","1","10","0"]
		];
	}else if(name == '山东'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"],
			["浪潮m81","7","2","79","5240724"],
			["用友-精智","7","2","237","3751055097"],
			["普奥云proudthink","3","1","18","84307"]
		];
	}else if(name == '广东'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"],
			["美云智数meicloud","1","1","111","274"],
			["富士康beacon","1","1","629","3615"]
		];
	}else if(name == '重庆'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"],
			["中国移动OneNET","5","3","4654","4774"]
		];
	}else if(name == '湖南'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"]
		];
	}else if(name == '江苏'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"],
			["华为oceanconnect","2","1","0","50462"],
			["徐工工业云","14","1","23782","531361"]
		];
	}else if(name == '云南'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"]
		];
	}else if(name == '甘肃'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"]
		];
	}else if(name == '安徽'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"],
			["用友-精智","7","2","237","3751055097"]
		];
	}else if(name == '河北'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"]
		];
	}else if(name == '山西'){
		datas = [
			["海尔COSMOPlat","354","80","72656","3375325679"]
		];
	}else{
		datas =[];
	}
	ranklistRight3Data(datas);
	
}

function ranklistRight3Data(datas){
	var ranklistRight3 = $('#ranklistRight3');
	ranklistRight3.empty();
	var str = "<table class='tab_content'>";
	for(var i = 0 ; i < datas.length ; i++){
		str +="<tr>"+
    	"<td width='150px'>"+datas[i][0]+"</td>"+
    	"<td>"+datas[i][1]+"</td>"+
    	"<td>"+datas[i][2]+"</td>"+
    	"<td>"+datas[i][3]+"</td>"+
    	"<td>"+datas[i][4]+"</td>"+
    	"</tr>"
	}
	str +="</table>";
	ranklistRight3.append(str);
}

/******************************v定时器*********************************/


//右上饼图
var pieData=[
    {value:200, name:'跨站脚本'},
    {value:456, name:'代码执行漏洞'},
    {value:2684, name:'拒绝服务漏洞'},
    {value:690, name:'信息泄露'},
    {value:1220, name:'溢出漏洞'},
    {value:205, name:'释放后重用'},
    {value:1968, name:'其他'},
]
/*var pieData=[
    {value:29, name:'跨站脚本'},
    {value:36, name:'代码执行漏洞'},
    {value:24, name:'释放后重用'},
    {value:41, name:'数字错误漏洞'},
    {value:64, name:'跨站请求伪造'},
    {value:33, name:'安全限制绕过'},
    {value:12, name:'缓存投毒漏洞'},
    {value:15, name:'整数溢出'},
    {value:28, name:'缓冲区溢出'},
    {value:27, name:'内存损坏'},
    {value:91, name:'拒绝服务漏洞'},
    {value:62, name:'命令注入'}, 
    {value:45, name:'权限提升'}, 
    {value:171, name:'信息泄露'}, 
    {value:42, name:'目录遍历'},
    {value:19, name:'输入验证'}, 
    {value:15, name:'权限许可和访问控制漏洞'},
    {value:122, name:'弱加密算法'}, 
]*/

function allData(data){
	var allNum=0
	for(var a=0;a<data.length;a++){
		allNum+=data[a].value
	}
	return allNum
}

var  color1 = ["#00a9e1","#0046af","#360293","#560081","#af0058","#ff8700", "#09a7e2", "#93dd6e","#fce24f","#b8ff2e","#09e24b","#09e2cb"]
rightPie(pieData,"rightPie1",7,color1)

var data1st=[
    {value:1, name:'互联网'},
    {value:3, name:'通信'},
    {value:5, name:'软件/系统服务领域'},
    {value:13, name:'垂直&创业领域'},
]

var  color3 = ["#ff8700", "#09a7e2", "#93dd6e","#fce24f","#b8ff2e","#09e24b","#09e2cb"]
rightPie(data1st,"webPie",4,color3)

//console.log(allData(data1st))


function rightPie(pieData,ele,num,color){
    var pie3Opt = {
        color:color,
        backgroundColor: 'transparent',
        tooltip : {
            trigger: 'item',
            //formatter: "{a} <br/>{b} : {c} ({d}%)",
            formatter:function(param){
                if(param.name){
                	return  '<div>'+param.name+'</div>' +
			        '<div>'+param.value+'  ('+param.percent+'%)</div>'
                }
    		},
            position:'right'
        },
        series: [{
            name: '',
            type: 'pie',
            radius: ['50%', '70%'],
            center: ['45%', '42%'],
            hoverAnimation: true,
            label: {
                normal: {
                    show: false,
                    position: 'center'
                },
                emphasis: {
                    show: false,
                    textStyle: {
                        fontSize: '30',
                        fontWeight: 'bold'
                    }
                }
            },
            data: pieData
        },{
            name: '',
            type: 'pie',
            clockWise: true,
            hoverAnimation: false,
            animationType: 'scale',
            radius: [200, 200],
            center: ['45%', '43%'],
            label: {
                normal: {
                    position: 'center'
                }
            },
            data: [{
                value: 0,
                label: {
                    normal: {
                        formatter: '38',
                        textStyle: {
                            color: '#20fd07',
                            fontSize: 25,
                            fontWeight: 'bold'
                        }
                    }
                }
            }, {
                tooltip: {
                    show: false
                },
                label: {
                    normal: {
                        formatter: '\n门户',
                        textStyle: {
                            color: '#bbeaf9',
                            fontSize: 12
                        }
                    }
                }
            }]
        }]
    };

    var pie3Chart = echarts.init(document.getElementById(ele))
    pie3Chart.setOption(pie3Opt)
    window.addEventListener("resize", function () {
        pie3Chart.resize();
    });
    var pieIndex = 0
    var t
    function pieAutoShow(){
        if (pieIndex >num-1){
            pieIndex = 0
        }
        for (var i = 0;i <num;i++){
            if (i != pieIndex){
                pie3Opt.series[0].data[i]['selected'] = false;
            }else{
                pie3Opt.series[0].data[i]['selected'] = true;
            }
        }
        pie3Opt.series[1].data[0].label.normal.formatter = Math.floor(pie3Opt.series[0].data[pieIndex].value/allData(pieData)*100) + "%"
        //pie3Opt.series[1].data[0].label.normal.formatter=parseInt(Math.random()*99) + "%"
        pie3Opt.series[1].data[1].label.normal.formatter = "" + pie3Opt.series[0].data[pieIndex].name
        pie3Chart.setOption(pie3Opt)
        pieIndex++
    }
    pieAutoShow()
    t=window.setInterval(pieAutoShow,1200)
}
var flag=true
$(".bugType li").click(function(){
	n=$(this).index();
	$(".bugType li").eq(n).addClass('active').siblings().removeClass('active')
	if(n==0){
        $("#rightPie1").show()
        $("#rightPie2").hide()
        window.clearInterval(t)
        rightPie(pieData,"rightPie1",11,color1)
	}else if(n==1){
        $("#rightPie1").hide()
        $("#rightPie2").show()
		var dataRight2=[
            {value:1374, name:'高危'},
            {value:5009, name:'中危'},
            {value:1038, name:'低危'},
        ]
        var color2=["red","#ff8d00","yellow"]
        if(!flag){
			window.clearInterval(t)
		}
        rightPie(dataRight2,"rightPie2",3,color2)
        flag=false
	}
})

//所有的柱状图
var xDataRight1=['江苏','山东', '北京', '上海', '广东']
var yDataRight1=[1846,1774, 1089, 1071, 422]

var xDataRight2=['COSMOPlat', '徐工工业云','宝信工业互联网平台', '航天云网INDICS', '寄云科技neuseer']
var yDataRight2=[4495, 1735, 555, 225, 199]

var xData=['山东', '广东', '北京', '重庆', '福建']
var yData=[169, 53, 49, 38, 29]

barRigEvt(xDataRight1,yDataRight1,"rightBar",0,2000,500)
barRigEvt1(xDataRight2,yDataRight2,"rightBar2",15,1200,300)
barRigEvt(xData,yData,"provinceBar",0,200,50)

function barRigEvt1(xData,yData,ele,rotate,num,step){
    var bugBarOption={
        tooltip: {
          trigger: 'axis',
          formatter: '{a}<br />{b} : {c}',
          axisPointer: {
              type: 'shadow',
          }
        },
        grid: {
            top:'8%',
	        left: '3%',
	        right: '3%',
	        bottom: '3%',
	        containLabel: true
        },
        yAxis: {
        	min: 0,
            max: num,
            interval: step,
            splitLine:{    //grid区域分隔线
                show:true,
                lineStyle: {
                    width:1,
                    type:"solid",
                    color:"#272858"
                }
            },
            axisLabel: {  //坐标轴标签
                show: true,
                textStyle: {
                    color: 'c0d4da'
                }
            },
            axisTick: {
                show: true   //刻度线
            },
            axisLine:{
                show: true,   //坐标轴轴线
                lineStyle: {
                    width:1,
                    color:"#c0d4da"
                }
            }
        },
        xAxis : {
            type: 'category',
            splitLine:{    //grid区域分隔线
                show:false,
                lineStyle: {
                    width:1,
                    type:"solid",
                    color:"#2a3f7e"
                }
            },
            axisTick: {
                show: true   //刻度线
            },
            axisLine: {
                show: true ,  //坐标轴轴线
                lineStyle: {
                    width:1,
                    color:"#c0d4da"
                }
            },
            axisLabel:{
                show: true,
                color:'#c0d4da',
                interval:false,
                rotate : rotate,
            },
            data:xData
        },
        series: [{
          name: '漏洞数',
          type: 'bar',
          barGap: '-100%',
          barCategoryGap:'60%',
          data: yData,
          itemStyle: {
            normal: {
                color: '#0ea4e3'
            }
          },
        }]
    }
    
    var bugBarChart = echarts.init(document.getElementById(ele));
    bugBarChart.setOption(bugBarOption);
    window.addEventListener("resize", function () {
        bugBarChart.resize()
    });
}

function barRigEvt(xData,yData,ele,rotate,num,step){
    var bugBarOption={
        tooltip: {
          trigger: 'axis',
          formatter: '{a}<br />{b} : {c}',
          axisPointer: {
              type: 'shadow',
          }
        },
        grid: {
            top:'8%',
	        left: '3%',
	        right: '3%',
	        bottom: '3%',
	        containLabel: true
        },
        yAxis: {
        	min: 0,
            max: num,
            interval: step,
            splitLine:{    //grid区域分隔线
                show:true,
                lineStyle: {
                    width:1,
                    type:"solid",
                    color:"#272858"
                }
            },
            axisLabel: {  //坐标轴标签
                show: true,
                textStyle: {
                    color: 'c0d4da'
                }
            },
            axisTick: {
                show: true   //刻度线
            },
            axisLine:{
                show: true,   //坐标轴轴线
                lineStyle: {
                    width:1,
                    color:"#c0d4da"
                }
            }
        },
        xAxis : {
            type: 'category',
            splitLine:{    //grid区域分隔线
                show:false,
                lineStyle: {
                    width:1,
                    type:"solid",
                    color:"#2a3f7e"
                }
            },
            axisTick: {
                show: true   //刻度线
            },
            axisLine: {
                show: true ,  //坐标轴轴线
                lineStyle: {
                    width:1,
                    color:"#c0d4da"
                }
            },
            axisLabel:{
                show: true,
                color:'#c0d4da',
                interval:false,
                rotate : rotate,
            },
            data:xData
        },
        series: [{
          name: '省内分布',
          type: 'bar',
          barGap: '-100%',
          barCategoryGap:'60%',
          data: yData,
          itemStyle: {
            normal: {
                color: '#0ea4e3'
            }
          },
        }]
    }
    
    var bugBarChart = echarts.init(document.getElementById(ele));
    bugBarChart.setOption(bugBarOption);
    window.addEventListener("resize", function () {
        bugBarChart.resize()
    });
}













